package com.itheima.info.manage.system.entry;

import com.itheima.info.manage.system.controller.BaseStudentController;
import com.itheima.info.manage.system.controller.OtherStudentController;
import com.itheima.info.manage.system.controller.StudentController;
import com.itheima.info.manage.system.controller.TeacherController;
import com.itheima.info.manage.system.domain.Student;
import com.itheima.info.manage.system.domain.Teacher;
import com.itheima.info.manage.system.factory.Factory;

import java.util.Scanner;

/*
系统的入口
 */
public class SystemEntry {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //StudentController studentController = new StudentController();
       // OtherStudentController studentController= new OtherStudentController();
        BaseStudentController studentController= Factory.getStudentController();
        TeacherController teacherController = new TeacherController();
        loop:while (true) {
            //展示菜单
            System.out.println("--------欢迎来到黑马信息管理系统--------");
            System.out.println("请输入您的选择: 1.学生管理  2.老师管理  3.退出");

            //录入数据
            String choice = sc.nextLine();
            //switch 选择
            switch (choice) {
                case "1":

                    studentController.start();
                    break;
                case "2":
                    teacherController.start();
                    break;
                case "3":
                    System.out.println("再见");
                   // break loop;
                   // return;
                    System.exit(0);
                default:
                    System.out.println("输入有误");
                    break ;
            }
        }
    }
}
